let initialstate = {
    oforg:[]
}
export default function ZCXreducer(state = initialstate, action: any) {
    // 1.深拷贝state,得到一个全新的state
    let newState = JSON.parse(JSON.stringify(state))


    // 2.匹配动作类型,对state进行对应的处理
    switch (action.type) {
        case "SAVE_OFORG":
            newState.oforg=action.payload
            break;
        default:
            return state
            break;
    }

    // 3.返回处理后全新的state
    return newState
}